import request from '@/utils/request'


// /admin/product/getCategory1
// getCategory1

// GET /admin/product/getCategory2/{category1Id}
// getCategory2

// GET /admin/product/getCategory3/{category2Id}

export interface CategoryModel {
    id:number,
    name:string,
    category1Id?:number,
    category2Id?:number
}

export default {
    getCategory1List(){
        return request.get<any,CategoryModel[]>(`/admin/product/getCategory1`)
    },
    getCategory2List(category1Id:number){
        return request.get<any,CategoryModel[]>(`/admin/product/getCategory2/${category1Id}`)
    },
    getCategory3List(category2Id:number){
        return request.get<any,CategoryModel[]>(`/admin/product/getCategory3/${category2Id}`)
    },
}